using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using Beetle;

internal class ag
{
	public class a
	{
		public Type a;

		public Delegate b;
	}

	public IList<a> a = new List<a>();

	[CompilerGenerated]
	private object m_b;

	[SpecialName]
	[CompilerGenerated]
	public object b()
	{
		return this.m_b;
	}

	[SpecialName]
	[CompilerGenerated]
	public void b(object A_0)
	{
		this.m_b = A_0;
	}

	public void b(Type A_0, Delegate A_1)
	{
		this.a.Add(new a
		{
			a = A_0,
			b = A_1
		});
	}

	public void b(IChannel A_0, object A_1, object A_2)
	{
		Delegate @delegate = null;
		for (int num = 0; num < this.a.Count; num++)
		{
			a a2 = this.a[num];
			if (a2.a == A_1.GetType())
			{
				@delegate = a2.b;
				Type type = Type.GetType("Beetle.EventCallBackHandlerArgs`1");
				type = type.MakeGenericType(a2.a);
				object obj = Activator.CreateInstance(type, A_0, A_1, A_2);
				@delegate.DynamicInvoke(obj);
				break;
			}
		}
	}
}
